package cn.edu.cuit.aumalls.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.cuit.aumalls.entity.User;
import cn.edu.cuit.aumalls.service.UserRegisterService;
import en.edu.cuit.aumalls.mapper.RegisterMapper;

@Service("userRegisterService")
public class UserRegisterServiceImpl implements UserRegisterService {
	
	
	@Autowired
	private RegisterMapper registermapper;
	
	public boolean InsertUser(String username, String password, String userphone, String useraddress) {
		
		User user =new User();
		user.setUser_name(username);
		user.setUser_pass(password);
		user.setUser_phone(userphone);
		user.setUser_address(useraddress);
		int count = registermapper.registerByNew(user);
		if(count>0) {
			return true;
		}else {
			return false;
		}		
	}
}
